﻿using ETask.Api.Dtos;
using ETask.Api.Services;
using Microsoft.AspNetCore.Mvc;

namespace ETask.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class PlatRegisterController : ControllerBase
    {
        private readonly IPlatRegisterService _regService;

        public PlatRegisterController(IPlatRegisterService regService)
        {
            _regService = regService;
        }


        [HttpPost("register")]
        public async Task<IActionResult> Register([FromBody] PlatRegisterDto registerDto)
        {
            var res = await _regService.Register(registerDto);
            return Ok(res);
        }
    }
}
